New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

gauge

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gauge

A terminal based horizontal guage


Version published
Weekly downloads
15M
decreased by-16.12%
Maintainers
6
Weekly downloads
 
Created
Issues
8

What is gauge?

The gauge npm package is a minimalistic progress bar module for Node.js that can display different types of progress information. It is designed to be flexible and can be used in command-line applications to provide visual feedback to users about the progress of an operation.

What are gauge's main functionalities?

Basic Progress Bar

This feature allows you to create a basic progress bar that shows the progress of an operation. The 'show' method updates the progress bar with a label and the completion percentage.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.show('processing', 0.5);

Pulse

The 'pulse' method is used to keep the progress bar active without changing the progress. It can be used to indicate that an operation is ongoing when the progress percentage cannot be determined.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.pulse('item being processed');

Set the Progress

This feature allows you to update the progress bar to a specific value. The value is a fraction between 0 and 1, where 1 represents 100% completion.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.show('loading', 0.75);

Hide the Progress Bar

The 'hide' method is used to remove the progress bar from the display. This is typically used once an operation has completed.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.hide();

Other packages similar to gauge

FAQs

Package last updated on 13 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts